<template>
    <div>
        <template>
            <el-table :data="showarr" stripe style="width: 100%">
                <el-table-column label="ID" width="210">
                    <template slot-scope="scope">
                        <span style="margin-left: 0px">{{ scope.row.id }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="单价" width="210">
                    <template slot-scope="scope">
                        <span style="margin-left: 0px">{{ scope.row.actualPrice }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="商品名称" width="210">
                    <template slot-scope="scope">
                        <span style="margin-left: 0px">{{ scope.row.dtitle }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="日期" width="210">
                    <template slot-scope="scope">
                        <span style="margin-left: 0px">{{ scope.row.createTime }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="图片" width="210">
                    <template slot-scope="scope">
                        <div style="margin-left: 0px" class="commdityimg">
                            <img :src="scope.row.mainPic" alt="">
                        </div>
                        <!-- <span ></span> -->
                    </template>
                </el-table-column>
            </el-table>

        </template>
        <div class="block">
            <gonggong></gonggong>
        </div>
    </div>
</template>

<script>
import bus from "../JS/bus";
import { axiosApi } from "../axios/api.js";
export default {
    data() {
        return {
            showarr: [],
            pageSize: 6,
        }
    },
    created() {
        axiosApi.get1().then((val) => {
            // console.log(val);
            this.showarr = val.list
            // console.log('1111', this.showarr);
            bus.$emit('changdata', this.showarr)
        })
        bus.$on("send2", (val) => {
            this.showarr = val
        });
    },
    methods: {

    }

}
</script>

<style lang="less" scoped>
.commdityimg {
    width: 100px;
    height: 100px;
}

.commdityimg img {
    width: 100%;
}

.block {
    top: calc(100vh - 60px);
    left: calc(100vw - 600px);
}
</style>